function grad = GradComponent(Function, rs, i, eps, fx)
    delta = 0;  
    udelta = 0;
    rsteps = sqrt(eps);
    xi = rs(i);        
    tmp = 1.0;
    if (abs(xi) >= 1.0) 
        tmp = abs(xi);
    end
    if (udelta > rsteps * tmp)
        delta = udelta;
    else
        delta = rsteps * tmp;
    end    
    if (xi < 0)
        delta = -delta;
    end    
    rs(i) = rs(i) + delta;
    ft = feval(Function,rs);
    grad = (ft - fx) / delta;
